Repository navigation
fix(experiments): enforce object-level access in experiment Max tools - #87802
Merged
Merged
Conversation
|
😎 Merged successfully - details. |
jurajmajerik
marked this pull request as ready for review
August 24, 2026 12:44
Contributor
🤖 CI report
|
Contributor
|
Reviews (1): Last reviewed commit: "fix(experiments): enforce object-level a..." | Re-trigger Greptile |
There was a problem hiding this comment.
This closes an object-level access-control gap in security-sensitive experiment tools, but the author is on the owning team (team-experiments) and the diff includes denial tests exercising the new checks, satisfying the independent-assurance bar for risky territory; no unresolved comments or holds.
- Author wrote 0% of the modified lines and has 61 merged PRs in these paths (familiarity MODERATE).
- 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
| Gate | Result | |
|---|---|---|
| prerequisites | ✓ | all clear |
| deny-list | ✓ | no deny categories matched |
| size | ✓ | 22L, 1F substantive, 60L/3F incl. docs/generated/snapshots — within ceiling |
| tier | ✓ | T1-agent / T1b-small (60L, 3F, single-area, fix) |
| stamphog 2.0.0b4 | .stamphog/policy.yml @ 1cc55f3 · reviewed head 1cc55f3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ExperimentSummaryToolandSessionReplaySummaryToolonly check resource-levelexperiment:vieweraccess. A team member with an explicit object-level denial on a specific experiment can still summarize it (or list its replay counts) by passing the experiment ID. Flagged by veria-ai on #84320.Changes
check_object_access(experiment, "viewer")after loading the experiment in both summary tool paths and in the replay tool.MaxToolAccessDeniedErrorpast the tools' catch-all exception handlers so the framework renders the denial instead of a generic failure message.How did you test this code?
Added one denial test per tool (mocking
user_access_controlto deny, same pattern as the dashboard tool's test): removing any of the three checks fails the corresponding test. Adjustedtest_fetch_and_format_handles_nonexistent_experimentfor the reordered lookup. All 71 tests across the three experiment tool test files pass.Automatic notifications
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Claude Code follow-up to a veria-ai review finding on #84320 (pre-existing gap, deferred there as out of scope). Used the existing
MaxTool.check_object_accesshelper; precedent from alerts/customer_analytics/upsert_dashboard tools. Skills invoked: /wt, /writing-tests. Sibling cleanup PR: #87799. Note: #87799 removes the frontend-context path this PR also touches; whichever lands second needs a trivial rebase.